package tgc.edu.exam.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.exam.custom.CommonRepository;
import tgc.edu.exam.entity.Books;

@Repository
public interface BookRepository extends CommonRepository<Books, Integer>{

	List<Books> findByTitleLike(String title);
	List<Books> findByTypeId(Integer id);
	Books findByByid(String byid);
	
	@Query(value="SELECT  is_used,byid,filename,number,suthor,title,uuid,isbn FROM books",nativeQuery = true)
	List<Books> findAllBook();


}
